<?php
class RelationAttr extends BaseAttr {
	public function RelationAttr($attr, $lang=null, $mutil_lang=false){
		parent::BaseAttr($attr, $lang, $mutil_lang);
	}
	
	protected function init_data(){
		$relation_mod = new RelationModel();
		$relations = $relation_mod->get_list($this->attr['relation'], Lang::get_langs());
		lang_fatch($relations, LANGUAGE);
		reset($relations);
		$tree = new Tree($relations);
		$options = $tree->get_options('　');
		return array(
			'options' => $options
		);
	}
}

?>